<template>
  <div class="login flex items-center justify-end">
    <!-- <video src="https://media-cdn-zspms.kurogame.com/pnswebsite/website2.0/video/1730822400000/tb1ebtjqax469x8kur-1730859812622.mp4" autoplay loop class="background-video"></video> -->
    <video autoplay loop muted class="background-video">
      <source
        src="https://media-cdn-zspms.kurogame.com/pnswebsite/website2.0/video/1730822400000/tb1ebtjqax469x8kur-1730859812622.mp4"
        type="video/mp4" />
      <source src="https://example.com/video.webm" type="video/webm" />
      <source src="https://example.com/video.ogg" type="video/ogg" />
    </video>
    <div class="fixed left-0 top-0 w-[100vw]">
      <div class="flex items-center p-[40px]">
        <div class="text-[24px] text-white ml-[5px]">内部管理系统</div>
      </div>
    </div>
    <div class="w-[465px] min-h-[473px] login-bg rounded-[10px] shadow mr-[183px] box-border p-[50px]">
      <component :is="comp"></component>
    </div>
  </div>
</template>

<script lang="ts" setup>
import login from "./components/login.vue";
import regist from "./components/regist.vue";
import { useUserStore } from "@/store";

const comp = computed(() => {
  return useUserStore().currentPage == 0 ? markRaw(login) : markRaw(regist);
});
</script>

<style lang="less" scoped>
.login {
  width: 100%;
  height: 100%;
  background-image: url(https://media-cdn-zspms.kurogame.com/pnswebsite/website2.0/images/1730822400000/l2cr21ncrnj0fjrtmh-1730859800903.jpg);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.background-video {
  position: absolute;
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-bg {
  background: rgba(180, 180, 180, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 24;
}
</style>
